"""
  模块描述：语音文件推送接受服务
  @author 8526
  @date 2022-05-16 9:52:02
  版权所有 Copyright www.dahantc.com
"""

from flask import Flask, request

import receiveentity as entity

app = Flask(__name__)


@app.route('/voiceSmsFileReceive', methods=['POST'])
def hiddenNumCallReceive():
    status = 'success'
    try:
        requestJson = request.get_json()
        voiceFileRes = entity.voiceSmsFileResponseDecoder(requestJson)
        print('语音文件推送：', voiceFileRes)
    except Exception as e:
        print('数据解析异常 %s' % e)
        status = 'Failure'
    return {'status': status}


if __name__ == '__main__':
    app.run(debug=False, port=8080)
